#ifndef     __MUSIC_UART_H
#define     __MUSIC_UART_H

#include "../utils/object.h"
#include "../utils/nocopyable.h"
#include <stdint.h>


namespace driver {

class MusicUart_t : private utils::NoCopyable_t {

public:
    MusicUart_t();

    void play(uint8_t index);
    void set_volume(uint8_t val);
    void add_volume();
    void sub_volume();

    bool is_busy();

    void wait_busy();

private:
    void write_byte(uint8_t byte);
};

extern utils::Object<MusicUart_t> musicUart;

}

#endif
